import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import static java.util.Arrays.copyOf;

public class ArrayOfCopy {
    static int[] ret = new int[10];
    public static void CopyArray(int[] array, int len){
        for(int i = 0; i < array.length; i++){
            ret[i] = array[i];
        }
    }
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4};
        CopyArray(arr, arr.length);
        for (int x :
                ret) {
            System.out.println(x);
        }
    }
    public static void main1(String[] args) {
        int[] arr = {1, 2, 3, 4};
        int[] ret = copyOf(arr, arr.length);
        for (int x :
                ret) {
            System.out.println(x);
        }
    }
}
